#include <iostream>
#include <istream>
#include <stdexcept>
using namespace std;

istream& foo(istream& in){
    int v;
    while(in>>v,!in.eof()){
        if(in.bad())
            throw runtime_error("IO流错误");
        if(in.fail()){
            cerr<<"数据错误请重试"<<endl;
            in.clear();
            in.ignore(100,'\n');
            continue;
        }
        cout<<v<<endl;
    }
    in.clear();
    return in;
}
int main(){
    foo(cin);

    return 0;
}